Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Namespace to List, Query, and Fetch vector responses #52

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

austin-denoble
Copy link
Contributor

Problem

@jseldess noticed that the Go client doesn't return an explicit Namespace with data plane operations. This would be helpful for the end user as Namespace is configured when a user targets an index, so having the Namespace associated with the specific operation would be useful for validating the namespace where the data was retrieved. Additionally, other SDKs such as TypeScript return namespace as a part of the response object.

Solution

  • Add Namespace as a field in FetchVectorsResponse, ListVectorsResponse, and QueryVectorsResponse.
  • Update associated unit tests, mainly around marshaling of these structs.

We do not use omitempty for Namespace as the "" namespace has meaning as the default.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

Make sure CI unit / integration tests are passing. Make fetch, query, or list operations and confirm the appropriate Namespace is returned depending on which index is targeted.

Copy link
Contributor

@aulorbe aulorbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks @jseldess !

@austin-denoble austin-denoble merged commit a8bec31 into main Jul 30, 2024
3 checks passed
@austin-denoble austin-denoble deleted the adenoble/fetch-vectors-namespace branch July 30, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants